package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.point_change_config;
import com.ymttest.database.model.godmch.point_change_configExample;
import com.ymttest.database.model.godmch.point_change_configKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface point_change_configMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @SelectProvider(type=point_change_configSqlProvider.class, method="countByExample")
    int countByExample(point_change_configExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @DeleteProvider(type=point_change_configSqlProvider.class, method="deleteByExample")
    int deleteByExample(point_change_configExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @Delete({
        "delete from point_change_config",
        "where mch_id = #{mch_id,jdbcType=INTEGER}",
          "and change_type_id = #{change_type_id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(point_change_configKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @Insert({
        "insert into point_change_config (mch_id, change_type_id, ",
        "point_value, config_status, ",
        "remark, createTime, ",
        "updateTime)",
        "values (#{mch_id,jdbcType=INTEGER}, #{change_type_id,jdbcType=INTEGER}, ",
        "#{point_value,jdbcType=INTEGER}, #{config_status,jdbcType=INTEGER}, ",
        "#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(point_change_config record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @InsertProvider(type=point_change_configSqlProvider.class, method="insertSelective")
    int insertSelective(point_change_config record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @SelectProvider(type=point_change_configSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="mch_id", property="mch_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="change_type_id", property="change_type_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="point_value", property="point_value", jdbcType=JdbcType.INTEGER),
        @Result(column="config_status", property="config_status", jdbcType=JdbcType.INTEGER),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<point_change_config> selectByExample(point_change_configExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @Select({
        "select",
        "mch_id, change_type_id, point_value, config_status, remark, createTime, updateTime",
        "from point_change_config",
        "where mch_id = #{mch_id,jdbcType=INTEGER}",
          "and change_type_id = #{change_type_id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="mch_id", property="mch_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="change_type_id", property="change_type_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="point_value", property="point_value", jdbcType=JdbcType.INTEGER),
        @Result(column="config_status", property="config_status", jdbcType=JdbcType.INTEGER),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    point_change_config selectByPrimaryKey(point_change_configKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @UpdateProvider(type=point_change_configSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") point_change_config record, @Param("example") point_change_configExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @UpdateProvider(type=point_change_configSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") point_change_config record, @Param("example") point_change_configExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @UpdateProvider(type=point_change_configSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(point_change_config record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table point_change_config
     *
     * @mbggenerated Fri Aug 14 16:12:11 CST 2020
     */
    @Update({
        "update point_change_config",
        "set point_value = #{point_value,jdbcType=INTEGER},",
          "config_status = #{config_status,jdbcType=INTEGER},",
          "remark = #{remark,jdbcType=VARCHAR},",
          "createTime = #{createTime,jdbcType=TIMESTAMP},",
          "updateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where mch_id = #{mch_id,jdbcType=INTEGER}",
          "and change_type_id = #{change_type_id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(point_change_config record);
}